package com.thinqq.web.client.content.painter;

import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.ui.Anchor;
import com.google.gwt.user.client.ui.DecoratorPanel;
import com.google.gwt.user.client.ui.FlexTable;
import com.google.gwt.user.client.ui.FlowPanel;
import com.google.gwt.user.client.ui.Grid;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.Image;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.thinqq.web.client.ThinqQImageBundle;
import com.thinqq.web.client.constants.CSSConstants;
import com.thinqq.web.client.content.ApplicationDevelopment;
import com.thinqq.web.client.content.InformationTechnology;
import com.thinqq.web.client.content.handler.LinkClickHandler;

public class ApplicationDevelopmentContentPainter implements IContentPainter{

	
	private void updateMainAreaConent(HorizontalPanel mainContent,VerticalPanel relatedContent) {
		mainContent.clear();
		FlowPanel mainPanel = new FlowPanel();
		ApplicationDevelopment content = GWT.create(ApplicationDevelopment.class);
		ThinqQImageBundle imageBundle = GWT.create(ThinqQImageBundle.class);
		Label title = new Label(content.appDev());
		title.setStyleName(CSSConstants.CSS_MAIN_CONTENT_TITLE);
		
		mainPanel.setStyleName(CSSConstants.MAIN_CONTENT_COMMON_STYLE);
		mainPanel.add(title);
		//mainPanel.add(new Label(content.introline()));
		Image itContentImage = new Image(imageBundle.getAppDev());
		itContentImage.addStyleName(CSSConstants.CENTER_STYLE);
		mainPanel.add(itContentImage);
		//Grid grid = new Grid(,2);
		//grid.setWidget(0,0,itContentImage);
		FlowPanel itContentPanel = new FlowPanel();
		Label intoLine = new Label(content.introline());
		//intoLine.addStyleName(CSSConstants.UNORDERED_BULLET_LEVEL_1);
		itContentPanel.add(intoLine);
		//Independent Application Development
		Label independentDev = new Label(content.appDevIndependentModel());
		independentDev.addStyleName(CSSConstants.UNORDERED_BULLET);
		independentDev.addStyleName(CSSConstants.SUB_TITLE);
		itContentPanel.add(independentDev );
		Label independentDevOneLiner = new Label(content.appDevIndependentModelOneLiner());
		independentDevOneLiner.addStyleName(CSSConstants.UNORDERED_BULLET_LEVEL_1);
		itContentPanel.add(independentDevOneLiner);
		//Co-Operative Development
		Label CoOpModel = new Label(content.appDevCoOpModel());
		CoOpModel.addStyleName(CSSConstants.UNORDERED_BULLET);
		CoOpModel.addStyleName(CSSConstants.SUB_TITLE);
		itContentPanel.add(CoOpModel );
		Label CoOpModelOneLiner = new Label(content.appDevCoOpModelOneLiner());
		CoOpModelOneLiner.addStyleName(CSSConstants.UNORDERED_BULLET_LEVEL_1);
		itContentPanel.add(CoOpModelOneLiner);
		//Application Architecture Conformance
		Label appDevArch = new Label(content.appDevArchModel());
		appDevArch.addStyleName(CSSConstants.UNORDERED_BULLET);
		appDevArch.addStyleName(CSSConstants.SUB_TITLE);
		itContentPanel.add(appDevArch );
		Label appDevArchOneLiner = new Label(content.appDevArchModelOneLiner());
		appDevArchOneLiner.addStyleName(CSSConstants.UNORDERED_BULLET_LEVEL_1);
		itContentPanel.add(appDevArchOneLiner);
		//Architecture Design
		Label appDevAppDesign = new Label(content.appDevAppDesign());
		appDevAppDesign.addStyleName(CSSConstants.UNORDERED_BULLET);
		appDevAppDesign.addStyleName(CSSConstants.SUB_TITLE);
		itContentPanel.add(appDevAppDesign );
		Label appDevAppDesignOneLiner = new Label(content.appDevAppDesignOneLiner());
		appDevAppDesignOneLiner.addStyleName(CSSConstants.UNORDERED_BULLET_LEVEL_1);
		itContentPanel.add(appDevAppDesignOneLiner);
		//grid.setWidget(0,1,itContentPanel);
		mainPanel.add(itContentPanel);
		mainContent.add(mainPanel);
	}


	@Override
	public void updateConent(HorizontalPanel mainContent,
			VerticalPanel relatedContent) {
		updateMainAreaConent(mainContent,relatedContent);
		
	}

}
